<template>
    <div class="text-loading-container">
        <div class="text-loading-content">
            <div class="text-loading-bg"></div>
            <div class="text-loading-progress" :style="{ width: progress*100 + '%' }"></div>
            <span class="text-loading-text">{{ text }}</span>
        </div>
    </div>
</template>

<script>
export default {
    name: "TextLoadingBar",
    props: ["progress", "text"],
    data() {
        return {
        }
    }
}
</script>

<style scoped>
.text-loading-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.text-loading-content {
    width: 200px;
    height: 40px;
    position: relative;
}

.text-loading-bg {
    position: absolute;
    width: 100%;
    height: 20px;
    background-color: rgb(48, 48, 48);
}

.text-loading-progress {
    position: absolute;
    width: 0;
    height: 20px;
    background-color: rgb(194, 194, 194);
}

.text-loading-text {
    position: absolute;
    width: 100%;
    height: 20px;
    background-color: transparent;
    font-size: 20px;
    font-style: italic;
    transform: translateY(20px);
}
</style>